﻿using System;
using System.Collections.Generic;
using Sudoku.Game.Abstract;

namespace Sudoku.Game.Concrete
{

    class FakeGenerator: IGenerator
    {
        private List<int[,]> temlates =
        new List<int[,]>
    			{
    				{
    					new int[9,9]
    					   	{
    					   		{5, 4, 7, 1, 8, 6, 3, 2, 9},
    					   		{6, 1, 9, 4, 3, 2, 8, 7, 5},
    					   		{8, 2, 3, 5, 9, 7, 4, 6, 1},
    					   		{3, 6, 1, 2, 7, 5, 9, 4, 8},
    					   		{2, 8, 5, 6, 4, 9, 1, 3, 7},
    					   		{9, 7, 4, 8, 1, 3, 6, 5, 2},
    					   		{4, 9, 2, 3, 5, 8, 7, 1, 6},
    					   		{7, 3, 6, 9, 2, 1, 5, 8, 4},
    					   		{1, 5, 8, 7, 6, 4, 2, 9, 3},
    					   	}
    				},
                        new int[9,9]
    					   	{
    					   		{6, 1, 7, 2, 8, 4, 3, 5, 9},
    					   		{2, 3, 4, 1, 5, 9, 7, 6, 8},
    					   		{5, 8, 9, 3, 7, 6, 1, 4, 2},
    					   		{9, 7, 1, 5, 4, 2, 6, 8, 3},
    					   		{3, 2, 5, 6, 1, 8, 4, 9, 7},
    					   		{8, 4, 6, 7, 9, 3, 2, 1, 5},
    					   		{7, 9, 2, 8, 6, 1, 5, 3, 4},
    					   		{1, 5, 8, 4, 3, 7, 9, 2, 6},
    					   		{4, 6, 3, 9, 2, 5, 8, 7, 1},
                     },
                            new int[9,9]
    					   	{
    					   		{9, 5, 3, 4, 8, 2, 7, 1, 6},
    					   		{8, 6, 7, 9, 5, 1, 4, 3, 2},
    					   		{2, 4, 1, 6, 7, 3, 9, 8, 5},
    					   		{3, 8, 6, 2, 4, 5, 1, 7, 9},
    					   		{7, 9, 4, 8, 1, 6, 5, 2, 3},
    					   		{5, 1, 2, 3, 9, 7, 6, 4, 8},
    					   		{4, 3, 5, 1, 6, 8, 2, 9, 7},
    					   		{6, 2, 9, 7, 3, 4, 8, 5, 1},
    					   		{1, 7, 8, 5, 2, 3, 9, 6, 4},
                    },
                          new int[9,9]
    					   	{
    					   		{9, 2, 3, 6, 8, 1, 7, 4, 5},
    					   		{5, 7, 8, 2, 3, 4, 9, 1, 6},
    					   		{1, 6, 4, 7, 9, 5, 3, 2, 8},
    					   		{8, 4, 9, 5, 7, 2, 1, 6, 3},
    					   		{7, 3, 1, 9, 4, 6, 5, 8, 2},
    					   		{2, 5, 6, 3, 1, 8, 7, 4, 9},
    					   		{9, 1, 7, 8, 5, 3, 2, 9, 4},
    					   		{4, 8, 5, 1, 2, 9, 6, 3, 7},
    					   		{3, 9, 2, 4, 6, 7, 8, 5, 1},
                            }
                
              };



        public int[,] GenerateField()
        {
            return temlates[new Random().Next(temlates.Count)];
        }
    }
}
